import { Logger } from '@/utils/logger';
import { Colony } from './Colony';
import { NormalColony } from './instances/normal/NormalColony';

export class ColonyFactory {

    produce(capitalRoom: string, outpostNames: string[], operatingMode: ColonyOperatingMode) {
        let colony: Colony;
        switch (operatingMode) {
            case 'normal':
                colony = new NormalColony(capitalRoom, outpostNames);
                break;
            default:
                Logger.warn(`无法确定 "${capitalRoom}" 的 operatingMode，使用默认 normal 模式`);
                colony = new NormalColony(capitalRoom, outpostNames);
        }
        return colony;
    }

}